package com.mtsmda.bookjava7.chapter11.generics.myGeneric;

import java.util.ArrayList;
import java.util.List;

public class GenericClass<T> {

	List<T> list;

	public GenericClass(List<T> list) {
		this.list = list;
	}

	public List<T> getList() {
		return list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public T getFirstTElement() {
		if (this.list != null && !this.list.isEmpty()
				&& this.list.get(0) != null) {
			return this.list.get(0);
		}
		return null;
	}

}